package com.yq.design.builder.simple;

/**
 * @ClassName HouseDirector
 * @Description TODO
 * @Author yaoqiang
 * @Date 2021/3/11 11:39
 * @Version 1.0
 */
public class HouseDirector {
    public HouseBuilder houseBuilder=null;

    public HouseDirector(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House constractHouse(){
        houseBuilder.buildBasic();
        houseBuilder.buildWall();
        houseBuilder.buildRoof();
        return houseBuilder.buildHouse();
    }
}
